<template>
    <div class="container">
      <global-header :user='currerUser'></global-header>
      <colum-list :list="list"></colum-list>
      <vaildate-input :rules="testRules"></vaildate-input>
    </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import 'bootstrap/dist/css/bootstrap.min.css'
import VaildateInput, { RulesProp } from './components/VaildateInput.vue'
import GlobalHeader, { UserProps } from './components/GlobalHeader.vue'
import ColumList, { ColumnProps } from './components/ColumList.vue'

const testData: ColumnProps[] = [
  {
    id: 1,
    title: '这是test1的专栏',
    avatar: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2749294814,1592070743&fm=26&gp=0.jpg',
    descrtption: '这是test1的专栏这是test1的专栏这是test1的专栏'
  },
  {
    id: 2,
    title: '这是test2的专栏',
    // avatar: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2749294814,1592070743&fm=26&gp=0.jpg',
    descrtption: '这是test2的专栏这是test2的专栏这是test2的专栏'
  },
  {
    id: 3,
    title: '这是test3的专栏',
    avatar: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2749294814,1592070743&fm=26&gp=0.jpg',
    descrtption: '这是test2的专栏这是test2的专栏这是test2的专栏'
  },
  {
    id: 4,
    title: '这是test3的专栏',
    avatar: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2749294814,1592070743&fm=26&gp=0.jpg',
    descrtption: '这是test2的专栏这是test2的专栏这是test2的专栏'
  }
]
const testUser: UserProps = {
  isLogin: true,
  name: 'tom',
  id: 1
}
const testRules: RulesProp = [
  {
    type: 'email',
    message: '请输入正确邮箱'
  }
]
export default defineComponent({
  name: 'App',
  components: {
    ColumList,
    GlobalHeader,
    VaildateInput
  },
  setup () {
    return {
      list: testData,
      currerUser: testUser,
      testRules: testRules
    }
  }
})
</script>

<style>
</style>
